<template>
  <div>
    <h2 >点击排行</h2>
    <div class="paihang" v-for="item in clcount" :key="item.uid">
      <img class="paihang_img" :src="item.fileUid" @click="findBlogByUid(item.uid)">
      <div class="paihang_tit" @click="findBlogByUid(item.uid)">{{item.title}}</div>
      <div class="paihang_time">{{item.createTime}}</div>
    </div>
  </div>
</template>

<script>
  import axios from "axios";
  export default {
    name: "clickcount",
    data() {
      return {
        clcount : [], //标签列表

      };
    },

    methods: {
      findBlogByUid:function (uid) {
        this.$router.push('/bloginfo/'+uid);
      },
      findByCount:function () {
        var _this=this;
        axios.get("/api/blogs/findByCount").then(function (res) {
          console.log(res.data)
          _this. clcount=res.data
        })
      },
    },
    mounted() {
      this.findByCount();
    }
  };
</script>

<style>
  .paihang_time{
    color: #d3dce6;
  }
.paihang{
  width: 390px;
  height: 120px;
  background-color: #FFFFFF;
  margin-top: 20PX;
  border-bottom: #d3dce6 1px solid;

}
.paihang:hover{
  box-shadow: #666 0 0 0.7rem;
}
  .paihang_img{
    width: 130px;
    height: 100px;
    margin-top: 10px;
    float: left;
    margin-left: 20px;
  }
  .paihang_tit{
    line-height: 80px;
  }
</style>
